package com.ItemsRent.model;
// default package

import com.ItemsRent.model.Customer;
import com.ItemsRent.model.ItemType;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import org.apache.struts2.json.annotations.JSON;

/**
 * Item entity. @author MyEclipse Persistence Tools
 */

public class ItemTable  implements java.io.Serializable {


    // Fields    

     private Integer itemId;
     private ItemType itemType;
     private Customer customer;
     private String itemName;
     private Integer itemPrice;
     private Integer itemNumber;
     private Integer itemStatus;
     private Integer rentCount;
     private String picture;
     private Timestamp addDate;
     private String itemDiscription;

    // Constructors

    /** default constructor */
    public ItemTable() {
    }

	/** minimal constructor */
    public ItemTable(ItemType itemType, Customer customer, String itemName, Integer itemPrice, Integer itemNumber, Integer itemStatus, Integer rentCount) {
        this.itemType = itemType;
        this.customer = customer;
        this.itemName = itemName;
        this.itemPrice = itemPrice;
        this.itemNumber = itemNumber;
        this.itemStatus = itemStatus;
        this.rentCount = rentCount;
    }
    
    public ItemTable(ItemType itemType, Customer customer, String itemName, Integer itemPrice, Integer itemNumber,  String picture,  String itemDiscription) {
        this.itemType = itemType;
        this.customer = customer;
        this.itemName = itemName;
        this.itemPrice = itemPrice;
        this.itemNumber = itemNumber;
        this.itemStatus=0;
        this.rentCount=0;
        this.picture = picture;
        this.itemDiscription = itemDiscription;
    }
    
    
    /** full constructor */
    public ItemTable(ItemType itemType, Customer customer, String itemName, Integer itemPrice, Integer itemNumber, Integer itemStatus, Integer rentCount, String picture, Timestamp addDate, String itemDiscription) {
        this.itemType = itemType;
        this.customer = customer;
        this.itemName = itemName;
        this.itemPrice = itemPrice;
        this.itemNumber = itemNumber;
        this.itemStatus = itemStatus;
        this.rentCount = rentCount;
        this.picture = picture;
        this.addDate = addDate;
        this.itemDiscription = itemDiscription;
    }

   
    // Property accessors

    public Integer getItemId() {
        return this.itemId;
    }
    
    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public ItemType getItemType() {
        return this.itemType;
    }
    
    public void setItemType(ItemType itemType) {
        this.itemType = itemType;
    }

    
    public Customer getCustomer() {
        return this.customer;
    }
    
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public String getItemName() {
        return this.itemName;
    }
    
    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public Integer getItemPrice() {
        return this.itemPrice;
    }
    
    public void setItemPrice(Integer itemPrice) {
        this.itemPrice = itemPrice;
    }

    public Integer getItemNumber() {
        return this.itemNumber;
    }
    
    public void setItemNumber(Integer itemNumber) {
        this.itemNumber = itemNumber;
    }

    public Integer getItemStatus() {
        return this.itemStatus;
    }
    
    public void setItemStatus(Integer itemStatus) {
        this.itemStatus = itemStatus;
    }

    public Integer getRentCount() {
        return this.rentCount;
    }
    
    public void setRentCount(Integer rentCount) {
        this.rentCount = rentCount;
    }

    public String getPicture() {
        return this.picture;
    }
    
    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Timestamp getAddDate() {
        return this.addDate;
    }
    
    public void setAddDate(Timestamp addDate) {
        this.addDate = addDate;
    }

    public String getItemDiscription() {
        return this.itemDiscription;
    }
    
    public void setItemDiscription(String itemDiscription) {
        this.itemDiscription = itemDiscription;
    }
	
	@Override
	public String toString(){
		return "物品号： " + this.itemId + " " + this.itemName + " " + this.itemDiscription + " " + this.addDate;
	}






}